Recently, as electronic appliances trend toward miniaturization, low power consumption, high performance, multi-functionality, and so on, semiconductor devices capable of storing information in various electronic appliances such as computers, portable communication devices, and so on, have been demanded. Such semiconductor devices include semiconductor devices that have a variable resistance characteristic, i.e., semiconductor devices that can store data by switching between different resistance states according to an applied voltage or current. Such semiconductor devices include, for example, an RRAM (resistive random access memory), a PRAM (phase change random access memory), an FRAM (ferroelectric random access memory), an MRAM (magnetic random access memory), an E-fuse, etc.